﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Himall.Entity.Config
{
   public class CollocationSkuInfoConfig : EntityTypeConfiguration<CollocationSkuInfo>
    {
        public CollocationSkuInfoConfig()
        {
            ToTable("Himall_CollocationSkus");
            Property(item => item.SkuID).HasColumnType("varchar").HasMaxLength(100);          
          
            HasRequired(x => x.Himall_CollocationPoruducts).WithMany(x => x.Himall_CollocationSkus).HasForeignKey(x => x.ColloProductId);
            HasRequired(x => x.Himall_Products).WithMany(x => x.Himall_CollocationSkus).HasForeignKey(x => x.ProductId);
        }
    }
}
